#include <iostream>
#include <assert.h>
#include <cstring>
using namespace std;

void  _memmove(char *desc,const char *src,int len)
{
	if(desc==NULL || src==NULL)
	{
		return;
	}	
	if(desc>=src && desc<=src+len-1)
	{
		src=src+len-1;
		desc=desc+len-1;
		while(len--)
		{
			*desc=*src;
			desc--;
			src--;
		}
	}	
	else{
		while(len--)
		{
			*desc=*src;
			desc++;
			src++;
		}		
	}
	
}

char* _strcpy(char *desc,const char *src)
{
	if(desc==NULL || src==NULL)
	{
		return NULL;
	}
	char *ret=desc;
	while((*desc=*src)!='\0')
	{
		desc++;
		src++;
	}
	
	return ret;
}

int main()
{
	char c[100]="hello";
	_memmove(c+1,c,strlen(c));
	cout<<c<<endl;
	return 0;
}
